14. Coprocessor 0

14.4 Context (4)


The Context register is a read/write register containing the pointer to an entry in the page table entry (PTE) array; this array is an operating system data structure that stores virtual-to-physical address translations.

When there is a TLB miss, the CPU loads the TLB with the missing translation from the PTE array. Normally, the operating system uses the Context register to address the current page map which resides in the kernel-mapped segment, kseg3. The Context register duplicates some of the information provided in the BadVAddr register, but the information is arranged in a form that is more useful for a software TLB exception handler.

Figure 14-4 shows the format of the Context register; Table 14-5 describes the Context register fields.



Figure 14-4 Context Register Format


Table 14-5; see page 224 of Errata.


Table 14-5 Context Register Fields

The 19-bit BadVPN2 field contains bits 31:13 of the virtual address that caused the TLB miss; bit 12 is excluded because a single TLB entry maps to an even-odd page pair. For a 4-Kbyte page size, this format can directly address the pair-table of 8-byte PTEs. For other page and PTE sizes, shifting and masking this value produces the appropriate address.




Copyright 1995, MIPS Technologies, Inc. -- 29 JAN 96


Generated with CERN WebMaker